package com.itheima.longtime;

import java.time.LocalDate;
import java.util.Date;
import java.util.Scanner;

public class LongTime {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("输入自己的出生年月日");

        //--------
        Date date=new Date();

        //------------------
        LocalDate birthTime=LocalDate.of(scanner.nextInt(),scanner.nextInt(),scanner.nextInt());

        LocalDate nowTime=LocalDate.now();
        long lNow = System.currentTimeMillis();
        System.out.println("现在的毫秒数 " +System.currentTimeMillis());
        //nowTime-birthTime
        int year = birthTime.getYear();
        int month = birthTime.getMonthValue(); // 月(1-12)
        int day = birthTime.getDayOfMonth(); // 日

        int yearNow = birthTime.getYear();
        int monthNow = birthTime.getMonthValue(); // 月(1-12)
        int dayNow = birthTime.getDayOfMonth(); // 日

        System.out.println("你活了" + (yearNow - year) + "年，" + (monthNow - month) + "月，" + (dayNow - day) + "日，");
    }
}
